// 代码中会兼容本地 service mock 以及部署站点的静态数据
export default {
  'POST /local/loginSubmit': (req, res) => {
    const { password, userName } = req.body;
    if (password === '888888' && userName === 'admin') {
      res.send({
        authority: 'admin',
        success: true,
        message: '请求成功',
        entity: {
          id: '148ef5619dc746a08c070b91614f04ae',
          userName: '前端测试',
          password: '207CF410532F92A47DEE245CE9B11FF71F578EBD763EB3BBEA44EBD043D018FB',
        },
      });
      return;
    }
    if (password === '123456' && userName === 'user') {
      res.send({
        authority: 'user',
        success: true,
        message: '请求成功',
        entity: {
          id: '148ef5619dc746a08c070b91614f04ae',
          userName: '前端测试',
          password: '207CF410532F92A47DEE245CE9B11FF71F578EBD763EB3BBEA44EBD043D018FB',
        },
      });
      return;
    }
    res.send({
      authority: 'guest',
      success: false,
      message: '用户名密码错误',
      entity: {},
    });
  },
  'POST /local/updatePasswordSubmit': {
    success: true,
    message: '请求成功',
    entity: {},
  },
  'POST /local/initSystem': {
    success: true,
    message: '请求成功',
    entity: { sysNameCN: '监管平台' },
  },
};
